package com.woniu.ucenterservice.dao;

import com.woniu.ucenterservice.pojo.Favorite;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FavoriteMapper {
    int deleteByPrimaryKey(Integer favId);

    int insert(Favorite record);

    int insertSelective(Favorite record);

    Favorite selectByPrimaryKey(Integer favId);

    int updateByPrimaryKeySelective(Favorite record);

    int updateByPrimaryKey(Favorite record);
    @Select("select * from favorite where user_id=#{userId}")
    List <Favorite> selectFavByUid(Integer userId);
    @Select("delete from favorite where goods_id=#{goodsId}")
    void deleteByGoodId(Integer goodsId);
    void batchDeleteMyFav(List<Integer> list);
}